package game.command.client
{
	import game.define.NotificationName;
	import game.define.PlayerSelfGlobalKey;
	import game.view.universal.PlayerItem;
	
	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.patterns.command.SimpleCommand;
	
	public class ScenePlayerMovedCommand extends SimpleCommand
	{
		public function ScenePlayerMovedCommand()
		{
			super();
		}
		
		override public function execute(notification:INotification):void
		{
			var playerItem:PlayerItem = notification.getBody() as PlayerItem;
			if (!playerItem)
				return;
			
			var globalKey:String = playerItem.getGlobalKey();
			if (globalKey == PlayerSelfGlobalKey.VALUE)
			{
				sendNotification(NotificationName.MOVE_SCENE_MAP);
			}
			else
			{
				
			}
		}
	}
}